Optimal. Leaf size=144 \[ -\frac{2 b^2 f p^2 q^2 \text{PolyLog}\left (2,-\frac{h (e+f x)}{f g-e h}\right )}{h (f g-e h)}-\frac{2 b f p q \log \left (\frac{f (g+h x)}{f g-e h}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{h (f g-e h)}+\frac{(e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(g+h x) (f g-e h)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.200409, antiderivative size = 144, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.179, Rules used = {2397, 2394, 2393, 2391, 2445} \[ -\frac{2 b^2 f p^2 q^2 \text{PolyLog}\left (2,-\frac{h (e+f x)}{f g-e h}\right )}{h (f g-e h)}-\frac{2 b f p q \log \left (\frac{f (g+h x)}{f g-e h}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{h (f g-e h)}+\frac{(e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(g+h x) (f g-e h)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2397
Rule 2394
Rule 2393
Rule 2391
Rule 2445
Rubi steps
\begin{align*} \int \frac{\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(g+h x)^2} \, dx &=\operatorname{Subst}\left (\int \frac{\left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )^2}{(g+h x)^2} \, dx,c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac{(e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(f g-e h) (g+h x)}-\operatorname{Subst}\left (\frac{(2 b f p q) \int \frac{a+b \log \left (c d^q (e+f x)^{p q}\right )}{g+h x} \, dx}{f g-e h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac{(e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(f g-e h) (g+h x)}-\frac{2 b f p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \log \left (\frac{f (g+h x)}{f g-e h}\right )}{h (f g-e h)}+\operatorname{Subst}\left (\frac{\left (2 b^2 f^2 p^2 q^2\right ) \int \frac{\log \left (\frac{f (g+h x)}{f g-e h}\right )}{e+f x} \, dx}{h (f g-e h)},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac{(e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(f g-e h) (g+h x)}-\frac{2 b f p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \log \left (\frac{f (g+h x)}{f g-e h}\right )}{h (f g-e h)}+\operatorname{Subst}\left (\frac{\left (2 b^2 f p^2 q^2\right ) \operatorname{Subst}\left (\int \frac{\log \left (1+\frac{h x}{f g-e h}\right )}{x} \, dx,x,e+f x\right )}{h (f g-e h)},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac{(e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(f g-e h) (g+h x)}-\frac{2 b f p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \log \left (\frac{f (g+h x)}{f g-e h}\right )}{h (f g-e h)}-\frac{2 b^2 f p^2 q^2 \text{Li}_2\left (-\frac{h (e+f x)}{f g-e h}\right )}{h (f g-e h)}\\ \end{align*}
Mathematica [A] time = 0.229298, size = 200, normalized size = 1.39 \[ \frac{2 b^2 f p^2 q^2 (g+h x) \text{PolyLog}\left (2,\frac{h (e+f x)}{e h-f g}\right )-2 b f p q (g+h x) \log (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )+\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \left (a (f g-e h)+b (f g-e h) \log \left (c \left (d (e+f x)^p\right )^q\right )+2 b f p q (g+h x) \log \left (\frac{f (g+h x)}{f g-e h}\right )\right )+b^2 f p^2 q^2 (g+h x) \log ^2(e+f x)}{h (g+h x) (e h-f g)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.661, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( a+b\ln \left ( c \left ( d \left ( fx+e \right ) ^{p} \right ) ^{q} \right ) \right ) ^{2}}{ \left ( hx+g \right ) ^{2}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} 2 \, a b f p q{\left (\frac{\log \left (f x + e\right )}{f g h - e h^{2}} - \frac{\log \left (h x + g\right )}{f g h - e h^{2}}\right )} - b^{2}{\left (\frac{\log \left ({\left ({\left (f x + e\right )}^{p}\right )}^{q}\right )^{2}}{h^{2} x + g h} - \int \frac{e h \log \left (c\right )^{2} + 2 \, e h \log \left (c\right ) \log \left (d^{q}\right ) + e h \log \left (d^{q}\right )^{2} +{\left (f h \log \left (c\right )^{2} + 2 \, f h \log \left (c\right ) \log \left (d^{q}\right ) + f h \log \left (d^{q}\right )^{2}\right )} x + 2 \,{\left (f g p q + e h \log \left (c\right ) + e h \log \left (d^{q}\right ) +{\left (f h p q + f h \log \left (c\right ) + f h \log \left (d^{q}\right )\right )} x\right )} \log \left ({\left ({\left (f x + e\right )}^{p}\right )}^{q}\right )}{f h^{3} x^{3} + e g^{2} h +{\left (2 \, f g h^{2} + e h^{3}\right )} x^{2} +{\left (f g^{2} h + 2 \, e g h^{2}\right )} x}\,{d x}\right )} - \frac{2 \, a b \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right )}{h^{2} x + g h} - \frac{a^{2}}{h^{2} x + g h} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{b^{2} \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right )^{2} + 2 \, a b \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + a^{2}}{h^{2} x^{2} + 2 \, g h x + g^{2}}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (a + b \log{\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )}\right )^{2}}{\left (g + h x\right )^{2}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (b \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + a\right )}^{2}}{{\left (h x + g\right )}^{2}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]